<template>
  <div id="app">
    <div id="nav"></div>
    <router-view/>
  </div>
</template>
<script>
import { openGetToken } from "./request/api";
export default {
  data() {
    return {
      openToken: localStorage.getItem("Token") || ""
    };
  },
  created() {
    if (this.openToken) {
      openGetToken().then(res => {
        localStorage.setItem("Token", res.data);
      });
    }
  }
};
</script>
<style lang="less">
#app {
  background-color: #efefef;
  height: 100vh;
  width: 100vw;
}
</style>
